package com.chencl.cipher.service;

import com.chencl.cipher.dao.SecretKeyMapper;
import com.chencl.cipher.entity.SecretKeyEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @program: rsa-aes-cipher-spring-boot
 * @description:
 * @author: jiangshengli
 * @create: 2022-03-18 09:17
 */
@Service
public class SecretKeyService {

    @Autowired
    private SecretKeyMapper secretKeyMapper;

    public int insertSecretKey(SecretKeyEntity secretKey){
        return secretKeyMapper.insert(secretKey);
    }

    public int initAppid(){
        return secretKeyMapper.initAppid();
    }

    public SecretKeyEntity getSecretKeyByAppid(String appid){
        return secretKeyMapper.querySecretKeyByAppid(appid);
    }
}
